package com.qf.controller;


import com.qf.service.OrderService;
import com.qf.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/api")
public class DeleteOrder {
    @Autowired
    private OrderService orderService;
    @PostMapping("/delete")
    public R deleteUser(@RequestParam Integer id){
        orderService.deleteOrder( id);
        return R.ok();
    }
    @PostMapping("/batchDelete")
    public R batchDelete(@RequestParam("orids") List<Integer> orids) {
       orderService.batchDelete(orids);
       return R.ok();
    }

}
